package com.example.canteen.service.impl;

import com.example.canteen.domain.Inventory;
import com.example.canteen.mapper.InventoryMapper;
import com.example.canteen.mapper.ProductsMapper;
import com.example.canteen.service.InventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InventoryServiceImpl implements InventoryService {
    @Autowired
    private InventoryMapper inventoryMapper;



    @Override
    public List<Inventory> selectAllInventory() {
        return inventoryMapper.getAll();
    }

    @Override
    public Inventory selectInventoryById(int InventoryID ) {
        return null;
    }

    @Override
    public int insertInventory(Inventory inventory) {
        return InventoryMapper.insertInventory((Inventory) inventory);
    }

//    @Override
//    public int updateInventory(Inventory inventory) {
//        return InventoryMapper.updateInventory((Inventory) inventory);
//    }

    @Override
    public int deleteInventoryByID(int InventoryID) {
        return 0;
    }


}